<!-- home -->
<template>
  <div class="app-container">
    <div class="loginpage">
      <div class="loginlogo">
        <img src="@/assets/images/logo@2x.png" alt="">
      </div>
      <div class="login-inpcontent">
        <div class="login-inpgroup">
          <img src="@/assets/images/login-icon1.png" alt="">
          <input type="text" placeholder="请输入手机号">
        </div>
        <div class="login-inpgroup">
          <van-icon name="chat" color="#A89A9A" size="20" />
          <input type="text" placeholder="请输入验证码">
          <div class="logincheck">发送验证码</div>
        </div>
        <div class="login-inpgroup">
          <img src="@/assets/images/login-icon2.png" alt="">
          <input type="password" placeholder="请输入密码">
        </div>
        <div class="login-lastline">
          <span class="login-lastcheck">
            <img src="@/assets/images/login-icon3.png" alt="">
          </span>
          <span>已阅读并同意<span @click="showAgreement" class="loginagree">《用户服务协议》</span></span>
        </div>
        <div class="login-btnwrap">
          <button type="button" class="login-btn" @click="tapLogin">登陆</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// 请求接口
import {getUserInfo} from '@/api/user.js'
export default {
  components: {

  },

  data() {
    return {

    }
  },

  computed: {},

  mounted() {
    this.initData()
  },

  methods: {
    showAgreement(){
      this.$dialog.confirm({
        title: '用户服务协议',
        message: '协议内容',
        className:'resetmodalradius',
        messageAlign:'left',
        confirmButtonText:'同意',
        closeOnClickOverlay:true,
        confirmButtonColor:'#A89A9A',
        cancelButtonColor:'#999999',
      }).then(() => {
        // on confirm
      }).catch(() => {
        // on cancel
      });
    },
    tapLogin(){
      this.$router.push({
        name:'legalPersonInfoStepOne'
      })
      /*this.$router.push({
        name:'checkFace'
      })*/
    },
    // 请求数据案例
    initData() {
      // 请求接口数据，仅作为展示，需要配置src->config下环境文件
      getUserInfo()
        .then(() => {})
        .catch(() => {})
    },
    onChange(index) {
      if (index === 1) window.location.href = 'https://github.com/sunnie1992/vue-h5-template'
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
